# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=py3-sphinx-autodoc-typehints
_pyname=sphinx-autodoc-typehints
pkgver=1.11.0
pkgrel=0
pkgdesc="Type hints support for the Sphinx autodoc extension"
url="https://github.com/agronholm/sphinx-autodoc-typehints"
arch="noarch"
license="MIT"
options="net"
depends="python3 py3-sphinx py3-typing-extensions"
makedepends="py3-setuptools py3-setuptools_scm"
checkdepends="py3-pytest py3-sphobjinv"
source="https://files.pythonhosted.org/packages/source/${_pyname%${_pyname#?}}/$_pyname/$_pyname-$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$pkgver"

build() {
	python3 setup.py build
}

check() {
	# skip failing tests
	# https://github.com/agronholm/sphinx-autodoc-typehints/issues/99
	PYTHONPATH="build:$PYTHONPATH" pytest -v -k 'not test_sphinx_output'
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="9ffdeccc58ae349fac5e94fac0495c0a2c037293bd5f49a0a5f9844881b6af08b8a3de02fccf68ec14e3301121ebfc212a3dd20c986cee2784b06f899b8b5ea4  sphinx-autodoc-typehints-1.11.0.tar.gz"
